<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        #app{
            background-color: antiquewhite;
            margin-top: 285px;
        }

        .header {
            display: flex;
            justify-content: space-between;

            margin: 30px;
        }

        .list .shop {
            display: flex;
            justify-content: space-around;
            margin: 40px auto 20px;
        }

        .list .shop img {
            width: 20%;
            margin-left: 30px;
        }

        .list .shop .datas {
            width: 65%;
        }

        .list .shop .datas .mny {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
        }

        .list .shop .datas .mny button {
            margin: 0 20px;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="header">
            <span>已选商品</span>
            <span @click="search">清空</span>
        </div>
        <div class="list" v-for="(item,index) in shopArr">
            <div class="shop">
                <img :src="item.pic" alt="">
                <div class="datas">
                    <h3>{{item.name}}</h3>
                    <div class="mny">
                        <div>
                            <span>￥{{item.money}}</span>
                        </div>
                        <div>
                            <button @click="jian">-</button><span>{{item.num}}</span><button @click="jia">+</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="./vue-2.5.21.js"></script>
    <script src="./购物车.js"></script>
</body>

</html>